

class Student implements Cloneable{
    String name;
    String phoen;
    String num;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}

public class Test1 {

    public static void main(String[] args) throws CloneNotSupportedException {

        Student student = new Student();
        Student student1 = (Student) student.clone();
        student.name = "王五";
        System.out.println(student.name);
        System.out.println(student1.name);
        student1.name="李四";

        System.out.println(student.name);
        System.out.println(student1.name);

    }
}
